package com.atguigu.gulimall.product.service;

import com.atguigu.gulimall.product.vo.AttrResVo;
import com.atguigu.gulimall.product.vo.AttrVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.product.entity.AttrEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author HX
 * @email 1624242879@qq.com
 * @date 2021-01-17 20:55:42
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    //向attr和attr-group-relation表添加信息
    void saveDetail(AttrVo attrVo);

    //查询列表
    PageUtils queryBaseAttrPage(Map<String, Object> params, Long catelogId, String attrType);

    //修改时回显所有信息
    AttrResVo getAttrInfo(Long attrId);

    //修改
    void updateDetail(AttrVo attrVo);

    //查询属性和分组的关联
    List<AttrEntity> getRelationAttr(Long attrgroupId);

    //在attr中查询检索类型为1的数据
    List<Long> selectSearchAttrIds(List<Long> attrIds);
}

